// 导航栏切换模块
const navBtns = document.querySelectorAll('.nav-btn');
const modules = document.querySelectorAll('.module');

navBtns.forEach(btn => {
    btn.addEventListener('click', () => {
        // 移除所有按钮和模块的激活状态
        navBtns.forEach(b => b.classList.remove('active'));
        modules.forEach(m => m.classList.remove('active'));
        
        // 添加当前按钮和模块的激活状态
        btn.classList.add('active');
        const targetModule = document.getElementById(btn.dataset.target);
        if (targetModule) {
            targetModule.classList.add('active');
        }
    });
});

// 提交按钮的反馈功能
const submitBtn = document.querySelector('button');
const submitFeedback = document.getElementById('submit-feedback');

if (submitBtn && submitFeedback) {
    submitBtn.addEventListener('click', () => {
        submitFeedback.textContent = '提交成功！请等待审核~';
    });
}